package cn.tedu.egmvc2.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AddressController {
    @RequestMapping("/address/add")
    @ResponseBody
    public String addAddress(String receiver,String address,String email,String mobile,String tag)
    {
        System.out.println("收货地址："+ receiver+"--"+address+"--"+email+"--"+mobile+"--"+tag);
        return "添加地址成功";
    }
    @RequestMapping("/address/list")
    @ResponseBody
    public String getAddressList(){
        return "获取地址列表成功";
    }
    @RequestMapping("/address/delete")
    @ResponseBody
    public String deleteAddress(int id){
        System.out.println("删除地址成功："+id);
        return "删除地址成功";
    }
    @RequestMapping("/address/update")
    @ResponseBody
    public String updateAddress(int id,String receiver,String address,String email,String mobile,String tag)
        {
            System.out.println("修改地址成功："+id+"--"+receiver+"--"+address+"--"+email+"--"+mobile+"--"+tag);
            return "修改地址成功";
        }
}
